package com.jie.deletefile.design;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;

import com.jie.deletefile.R;

public class AutocompleteActivity extends AppCompatActivity {

    private AutoCompleteTextView at;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_autocomplete);
        initView();
    }

    private void initView() {
        at = (AutoCompleteTextView) findViewById(R.id.at);
        String[] datas = new String[]{"asdas", "asreew", "dffw", "adwq", "aqqwe", "sfrw"};
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, datas);
        at.setAdapter(adapter);

    }
}
